<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-1.12.4.js"></script>
</head>
<body>
<p>
    <span id="wenrou">温柔入睡乔碧萝</span>
    <span id="jiacheng">半夜起床李佳成</span>
</p>
<input type="text" name="username" id="username">
<button id="btn2">获取文本框输入的值</button>
<button id="btn1">获取P标签</button>
<script type="text/javascript">
    $("#btn2").click(function () {
        var val = $("#username").val();
        console.log(val)
    })
    console.log($("p").html())
    console.log($("p").text())

    $("#btn1").click(function () {
        $("#wenrou").text("中秋节过去了，元旦来了")
    })
</script>
</body>
</html>